﻿<%@ Page Language="C#" MasterPageFile="~/admin/MasterPageAdmin.master" AutoEventWireup="true" CodeFile="user.aspx.cs" Inherits="admin_admin_type" Title="用户管理 - 视频之家管理后台" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<%        if (Session["limit"].ToString() != "1")
        {
            Response.Redirect("logout.aspx");

        } %>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <div class="row">
                <div class="col-md-2">
                    <h3><span class="label label-default">用户管理</span></h3>
                </div>
                <div class="col-md-10"></div>
                <div class="col-md-2"></div>
            </div>
            <div class="row" style="padding-top: 50px">
                <div class="col-md-12">
                    <!-- Nav tabs -->
                    <ul class="nav nav-tabs" role="tablist" id="myTab">
                        <li role="presentation" class="active"><a href="#home" role="tab" data-toggle="tab">添加用户</a>
                        </li>
                        <li role="presentation"><a href="#profile" role="tab" data-toggle="tab">用户管理</a></li>
                    </ul>

                    <!-- Tab panes -->
                    <div class="tab-content" style="padding-top: 50px">
                        <!--添加-->
                        <div role="tabpanel" class="tab-pane active" id="home">
                            <form class="form-horizontal" role="form" name="addUserForm" id="addUserForm">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">用户名</label>
                                    <div class="col-sm-6">
                                        <input type="text" class="form-control" name="username" placeholder="">
                                    </div>
                                </div>
                                 <div class="form-group">
                                    <label class="col-sm-2 control-label">权限设置</label>
                                    <div class="col-sm-6">
                                        <select class="form-control" name="auth">
                                          <option value="1" selected>管理员</option>
                                          <option value="2">网站编辑</option>
                                          <option value="3">普通用户</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-sm-10">
                                        <button type="submit" class="btn btn-primary " id="addUser">添加</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <!--结束-->
                        <div role="tabpanel" class="tab-pane" id="profile">
                            <div style="padding-bottom: 20px">
                                <button type="button" class="btn btn-danger" id="delAll">批量删除</button>
                            </div>
                            <table class="table table-striped" style="text-align:center">
                                <thead>
                                <tr>
                                 <th>
                                        <input type="checkbox" id="selectAll">
                                    </th>
                                    <th>用户名</th>
                                    <th>权限级别</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody id="js-user" style="text-align:center">
                                <tr>
                                    <td>喜剧</td>
                                    <td>喜剧</td>
                                    <td>
                                        <button type="button" class="btn btn-info btn-xs update">更改</button>
                                        <button type="button" class="btn btn-danger btn-xs del">删除</button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>喜剧</td>
                                    <td>喜剧</td>
                                    <td>
                                        <button type="button" class="btn btn-info btn-xs update">更改</button>
                                        <button type="button" class="btn btn-danger btn-xs del">删除</button>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <!--结束-->
                    </div>
                </div>
                
            </div>

        </div>
    </div>
</div>
<!-- 更改弹框 -->
<div class="modal fade" id="updateTypes" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">用户修改</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" role="form" name="updateUser" id="updateUser">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">用户名</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" name="username" placeholder="">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">密码</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" name="password" placeholder="密码为空则不修改">
                        </div>
                    </div>
                     <div class="form-group">
                        <label class="col-sm-2 control-label">权限设置</label>
                        <div class="col-sm-6">
                            <select class="form-control" name="auth">
                              <option value="1" selected>管理员</option>
                              <option value="2">网站编辑</option>
                              <option value="3">普通用户</option>
                            </select>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" data-id="0" id="typeUpdateBtn">保存</button>
            </div>
        </div>
    </div>
</div>
<script src="js/user.js"></script>
</asp:Content>

